﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CBaseEvent
{
    protected Hashtable arguments;

    public object Sender { get; set; }

    public object Sender2 { get; set; }

    public object[] SenderArray { get; set; }

    public string EventName { get; set; }

    public CBaseEvent(string eventName, object sender)
    {
        EventName = eventName;
        Sender = sender;
        if (arguments == null)
        {
            arguments = new Hashtable();
        }
    }

    public CBaseEvent(string eventName, object sender, object sender2)
    {
        EventName = eventName;
        Sender = sender;
        Sender2 = sender2;
        if (arguments == null)
        {
            arguments = new Hashtable();
        }
    }

    /// <summary>
    /// 可变参数类型(参考KB)(支持多扩展)
    /// </summary>
    /// <param name="eventName"></param>
    /// <param name="Sender"></param>
    public CBaseEvent(string eventName, params object[] _sender)
    {
        EventName = eventName;
        //引用传递
        SenderArray = _sender;
        if (arguments == null)
        {
            arguments = new Hashtable();
        }
    }
}
